package com.jichaoyun.sys.controller;

import com.jichaoyun.config.WebServiceClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "预收费管理")
@RestController
public class ChargeController {
    @Autowired
    private WebServiceClient webServiceClient;
    @ApiOperation("经理确认充值")
    @PostMapping(value = "/app/charge/confirmCharge",produces = "application/json")
    public String agreeCharge(Integer id,String username, String password) {
        return webServiceClient.agreeCharge(id,username, password);
    }
    @ApiOperation("经理取消充值")
    @PostMapping(value = "/app/charge/cancelCharge",produces = "application/json")
    public String cancelCharge(Integer id,String username, String password,String remark) {
        return webServiceClient.disAgreeCharge(id,username, password,remark);
    }
    @ApiOperation("获取充值列表")
    @GetMapping(value = "/app/charge/getChargeList",produces = "application/json")
    public String getChargeFlowList(Integer pageNo) {
        return webServiceClient.getChargeFlowList(pageNo);
    }
}
